package com.ming.tflitesingleblur;

import android.content.Intent;
import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import android.view.View;
import android.widget.Button;

public class MainActivity extends AppCompatActivity implements View.OnClickListener {

    private Button mBtnInfer;
    private Button mBtnSegment;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
        initView();
    }

    public void initView() {
        mBtnInfer = findViewById(R.id.btn_infer);
        mBtnSegment = findViewById(R.id.btn_segment);
        mBtnInfer.setOnClickListener(this);
        mBtnSegment.setOnClickListener(this);

    }

    @Override
    public void onClick(View v) {
        switch (v.getId()){
            case R.id.btn_infer:
                startActivity(new Intent(this, Gl20SurfaceViewActivity.class));
                break;
            case R.id.btn_segment:
                startActivity(new Intent(this, SegmentationActivity.class));
                break;
        }
    }
}